<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="utf-8">
	<title>ClearPass - Three.js Docs</title>
	<meta name="viewport" content="width=device-width, user-scalable=no, minimum-scale=1.0, maximum-scale=1.0">
	<script src="../scripts/highlight.min.js"></script>
	<link type="text/css" rel="stylesheet" href="../styles/highlight-three.css">
	<link type="text/css" rel="stylesheet" href="../styles/page.css">
</head>
<body>
		<p class="inheritance" translate="no"><a href="Pass.html">Pass</a> → </p>
	<h1 translate="no">ClearPass</h1>
		<section>
			<header>
				<div class="class-description"><p>This class can be used to force a clear operation for the current read or
default framebuffer (when rendering to screen).</p></div>
				<h2>Code Example</h2>
				<div translate="no"><pre><code class="language-js">const clearPass = new ClearPass();
composer.addPass( clearPass );
</code></pre></div>
			</header>
			<article>
				<h2 class="subsection-title">Import</h2>
				<p><span translate="no">ClearPass</span> is an addon, and must be imported explicitly, see <a href="https://threejs.org/manual/#en/installation" target="_blank" rel="noopener">Installation#Addons</a>.</p>
				<pre><code class="language-js">import { ClearPass } from 'three/addons/postprocessing/ClearPass.js';</code></pre>
				<div class="container-overview">
					<h2>Constructor</h2>
					<h3 class="name name-method" id="ClearPass" translate="no">new <a href="#ClearPass">ClearPass</a><span class="signature">( clearColor : <span class="param-type">number | <a href="Color.html">Color</a> | string</span>, clearAlpha : <span class="param-type">number</span> )</span> </h3>
					<div class="method">
						<div class="description">
							<p>Constructs a new clear pass.</p>
						</div>
						<table class="params">
							<tbody>
								<tr>
									<td class="name">
										<strong>clearColor</strong>
									</td>
									<td class="description last">
										<p>The clear color.</p>
										<p>Default is <code>0x000000</code>.</p>
									</td>
								</tr>
								<tr>
									<td class="name">
										<strong>clearAlpha</strong>
									</td>
									<td class="description last">
										<p>The clear alpha.</p>
										<p>Default is <code>0</code>.</p>
									</td>
								</tr>
							</tbody>
						</table>
					</div>
				</div>
				<h2 class="subsection-title">Properties</h2>
				<div class="member">
					<h3 class="name" id="clearAlpha" translate="no">.<a href="#clearAlpha">clearAlpha</a><span class="type-signature"> : number</span> </h3>
					<div class="description">
						<p>The clear alpha.</p>
						<p>Default is <code>0</code>.</p>
					</div>
				</div>
				<div class="member">
					<h3 class="name" id="clearColor" translate="no">.<a href="#clearColor">clearColor</a><span class="type-signature"> : number | <a href="Color.html">Color</a> | string</span> </h3>
					<div class="description">
						<p>The clear color.</p>
						<p>Default is <code>0x000000</code>.</p>
					</div>
				</div>
				<div class="member">
					<h3 class="name" id="needsSwap" translate="no">.<a href="#needsSwap">needsSwap</a><span class="type-signature"> : boolean</span> </h3>
					<div class="description">
						<p>Overwritten to disable the swap.</p>
						<p>Default is <code>false</code>.</p>
					</div>
						<dl class="details">
							<dt class="tag-overrides"><strong>Overrides:</strong> <a href="Pass.html#needsSwap">Pass#needsSwap</a></dt>
						</dl>
				</div>
				<h2 class="subsection-title">Methods</h2>
					<h3 class="name name-method" id="render" translate="no">.<a href="#render">render</a><span class="signature">( renderer : <span class="param-type"><a href="WebGLRenderer.html">WebGLRenderer</a></span>, writeBuffer : <span class="param-type"><a href="WebGLRenderTarget.html">WebGLRenderTarget</a></span>, readBuffer : <span class="param-type"><a href="WebGLRenderTarget.html">WebGLRenderTarget</a></span>, deltaTime : <span class="param-type">number</span>, maskActive : <span class="param-type">boolean</span> )</span> </h3>
					<div class="method">
						<div class="description">
							<p>Performs the clear operation. This affects the current read or the default framebuffer.</p>
						</div>
						<table class="params">
							<tbody>
								<tr>
									<td class="name">
										<strong>renderer</strong>
									</td>
									<td class="description last">
										<p>The renderer.</p>
									</td>
								</tr>
								<tr>
									<td class="name">
										<strong>writeBuffer</strong>
									</td>
									<td class="description last">
										<p>The write buffer. This buffer is intended as the rendering
destination for the pass.</p>
									</td>
								</tr>
								<tr>
									<td class="name">
										<strong>readBuffer</strong>
									</td>
									<td class="description last">
										<p>The read buffer. The pass can access the result from the
previous pass from this buffer.</p>
									</td>
								</tr>
								<tr>
									<td class="name">
										<strong>deltaTime</strong>
									</td>
									<td class="description last">
										<p>The delta time in seconds.</p>
									</td>
								</tr>
								<tr>
									<td class="name">
										<strong>maskActive</strong>
									</td>
									<td class="description last">
										<p>Whether masking is active or not.</p>
									</td>
								</tr>
							</tbody>
						</table>
						<dl class="details">
							<dt class="tag-overrides"><strong>Overrides:</strong> <a href="Pass.html#render">Pass#render</a></dt>
						</dl>
					</div>
				<h2 class="subsection-title">Source</h2>
				<p>
					<a href="https://github.com/mrdoob/three.js/blob/master/examples/jsm/postprocessing/ClearPass.js" translate="no" target="_blank" rel="noopener">examples/jsm/postprocessing/ClearPass.js</a>
				</p>
			</article>
		</section>
<script src="../scripts/linenumber.js"></script>
<script src="../scripts/page.js"></script>
</body>
</html>